<template>
	<!-- 整个页面 -->
	<div class="Login">
		<img src="@/assets/weihuzhong1.svg" alt="" style="display: block; width:40%;">
		<div style="color:#fff; font-size:20px">正在维护中</div>
	</div>
</template>
<script>
	import {
		MessageBox
	} from 'element-ui'
	import axios from 'axios';
	import qs from 'qs' // axios自带的工具不需要安装npm依赖
	import {
		_debounce1
	} from "../../public/App";
	export default {
		data() {
			return {
				username: "",
				password: "",
				dialogVisible:false,
				formLabelAlign:{},
			};
		},

		// components: {},

		computed: {},

		// mounted: {},

		created() {
		},

		methods: {
			tiaozhuan() {
				this.$router.push("/Register");
			},
			LoginBt: _debounce1(async function(e) {
				const [err, res] = await this.$http.request({
					url: "/denglu/",
					method: "POST",
					data: {
						yonhuming: this.username,
						mima: this.password,
					},
				});
				if (err) return;
				// console.log(res);
				if(res.data.cuowutishi=="账户未激活, 请联系管理员或客服。"){
					this.dialogVisible=true;
					return false;
				}
				switch (res.data.zhuangtai) {
					case "shibai":
						this.$message.error("" + res.data.cuowutishi);
						break;
					case "chenggong":
						// this.$message({
						//           showClose: true,
						//           message: '登陆成功!',
						//           type: 'error'
						//         });
						this.$store.commit("updateUser", res.data.yonhushuju);
						this.$router.push("/My");
						break;
						return;
				}
			}),
			gb(){
				this.dialogVisible = false;
			}
		},
	};
</script>
<style lang='stylus' scoped>
	@import './Login.styl'
</style>

